3.79 \(\int \frac{(d+e x) (a+b \log (c x^n))^2}{x} \, dx\)

Optimal. Leaf size=70 \[ \frac{d \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}+e x \left (a+b \log \left (c x^n\right )\right )^2-2 a b e n x-2 b^2 e n x \log \left (c x^n\right )+2 b^2 e n^2 x \]

[Out]

-2*a*b*e*n*x + 2*b^2*e*n^2*x - 2*b^2*e*n*x*Log[c*x^n] + e*x*(a + b*Log[c*x^n])^2 + (d*(a + b*Log[c*x^n])^3)/(3
*b*n)

________________________________________________________________________________________

Rubi [A]  time = 0.0827744, antiderivative size = 70, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.238, Rules used = {2346, 2302, 30, 2296, 2295} \[ \frac{d \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}+e x \left (a+b \log \left (c x^n\right )\right )^2-2 a b e n x-2 b^2 e n x \log \left (c x^n\right )+2 b^2 e n^2 x \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x)*(a + b*Log[c*x^n])^2)/x,x]

[Out]

-2*a*b*e*n*x + 2*b^2*e*n^2*x - 2*b^2*e*n*x*Log[c*x^n] + e*x*(a + b*Log[c*x^n])^2 + (d*(a + b*Log[c*x^n])^3)/(3
*b*n)

Rule 2346

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.))/(x_), x_Symbol] :> Dist[d, Int[((d
 + e*x)^(q - 1)*(a + b*Log[c*x^n])^p)/x, x], x] + Dist[e, Int[(d + e*x)^(q - 1)*(a + b*Log[c*x^n])^p, x], x] /
; FreeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && GtQ[q, 0] && IntegerQ[2*q]

Rule 2302

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2296

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rubi steps

\begin{align*} \int \frac{(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx &=d \int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx+e \int \left (a+b \log \left (c x^n\right )\right )^2 \, dx\\ &=e x \left (a+b \log \left (c x^n\right )\right )^2+\frac{d \operatorname{Subst}\left (\int x^2 \, dx,x,a+b \log \left (c x^n\right )\right )}{b n}-(2 b e n) \int \left (a+b \log \left (c x^n\right )\right ) \, dx\\ &=-2 a b e n x+e x \left (a+b \log \left (c x^n\right )\right )^2+\frac{d \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}-\left (2 b^2 e n\right ) \int \log \left (c x^n\right ) \, dx\\ &=-2 a b e n x+2 b^2 e n^2 x-2 b^2 e n x \log \left (c x^n\right )+e x \left (a+b \log \left (c x^n\right )\right )^2+\frac{d \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}\\ \end{align*}

Mathematica [A]  time = 0.0207447, size = 59, normalized size = 0.84 \[ \frac{d \left (a+b \log \left (c x^n\right )\right )^3}{3 b n}+e x \left (a+b \log \left (c x^n\right )\right )^2-2 b e n x \left (a+b \log \left (c x^n\right )-b n\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x)*(a + b*Log[c*x^n])^2)/x,x]

[Out]

e*x*(a + b*Log[c*x^n])^2 + (d*(a + b*Log[c*x^n])^3)/(3*b*n) - 2*b*e*n*x*(a - b*n + b*Log[c*x^n])

________________________________________________________________________________________

Maple [C]  time = 0.338, size = 1555, normalized size = 22.2 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)*(a+b*ln(c*x^n))^2/x,x)

[Out]

-I*Pi*b^2*e*n*x*csgn(I*x^n)*csgn(I*c*x^n)^2-I*ln(x)*Pi*a*b*d*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)+1/2*I*ln(x)^2
*Pi*b^2*d*n*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)+I*Pi*b^2*e*n*x*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)+a^2*e*x+1/2
*Pi^2*b^2*e*x*csgn(I*x^n)^2*csgn(I*c*x^n)^3*csgn(I*c)-1/4*Pi^2*b^2*e*x*csgn(I*x^n)^2*csgn(I*c*x^n)^2*csgn(I*c)
^2-Pi^2*b^2*e*x*csgn(I*x^n)*csgn(I*c*x^n)^4*csgn(I*c)+1/2*Pi^2*b^2*e*x*csgn(I*x^n)*csgn(I*c*x^n)^3*csgn(I*c)^2
+I*ln(c)*Pi*b^2*e*x*csgn(I*x^n)*csgn(I*c*x^n)^2+I*ln(c)*Pi*b^2*e*x*csgn(I*c*x^n)^2*csgn(I*c)+I*Pi*a*b*e*x*csgn
(I*x^n)*csgn(I*c*x^n)^2+I*Pi*a*b*e*x*csgn(I*c*x^n)^2*csgn(I*c)-I*ln(x)*ln(c)*Pi*b^2*d*csgn(I*x^n)*csgn(I*c*x^n
)*csgn(I*c)-I*ln(c)*Pi*b^2*e*x*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-I*Pi*a*b*e*x*csgn(I*x^n)*csgn(I*c*x^n)*csgn
(I*c)-I*Pi*b^2*e*n*x*csgn(I*c*x^n)^2*csgn(I*c)-1/2*I*ln(x)^2*Pi*b^2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x^n)^5+1/2*Pi^2*b^2*e*x*csgn(I*c*x^n)^5*csgn(I*c)-1/4*Pi^2*b^2*e*x*csgn(I*c*x^n)^4*csgn(I*c)^2-1/4*ln(x)
*Pi^2*b^2*d*csgn(I*x^n)^2*csgn(I*c*x^n)^4+1/2*ln(x)*Pi^2*b^2*d*csgn(I*x^n)*csgn(I*c*x^n)^5+1/2*ln(x)*Pi^2*b^2*
d*csgn(I*c*x^n)^5*csgn(I*c)-1/4*ln(x)*Pi^2*b^2*d*csgn(I*c*x^n)^4*csgn(I*c)^2+ln(c)^2*b^2*e*x+ln(x)*ln(c)^2*b^2
*d+1/3*b^2*d*n^2*ln(x)^3+2*ln(c)*a*b*e*x-2*ln(c)*b^2*e*n*x-ln(x)^2*a*b*n*d-ln(x)^2*ln(c)*b^2*d*n-I*ln(c)*Pi*b^
2*e*x*csgn(I*c*x^n)^3+I*Pi*b^2*e*n*x*csgn(I*c*x^n)^3-1/4*Pi^2*b^2*e*x*csgn(I*c*x^n)^6-1/4*ln(x)*Pi^2*b^2*d*csg
n(I*c*x^n)^6+2*ln(x)*ln(c)*a*b*d-1/4*Pi^2*b^2*e*x*csgn(I*x^n)^2*csgn(I*c*x^n)^4-2*a*b*e*n*x-I*Pi*a*b*e*x*csgn(
I*c*x^n)^3-I*ln(x)*ln(c)*Pi*b^2*d*csgn(I*c*x^n)^3-I*ln(x)*Pi*a*b*d*csgn(I*c*x^n)^3+1/2*I*ln(x)^2*Pi*b^2*d*n*cs
gn(I*c*x^n)^3

________________________________________________________________________________________

Maxima [A]  time = 1.13951, size = 136, normalized size = 1.94 \begin{align*} b^{2} e x \log \left (c x^{n}\right )^{2} - 2 \, a b e n x + 2 \, a b e x \log \left (c x^{n}\right ) + \frac{b^{2} d \log \left (c x^{n}\right )^{3}}{3 \, n} + 2 \,{\left (n^{2} x - n x \log \left (c x^{n}\right )\right )} b^{2} e + a^{2} e x + \frac{a b d \log \left (c x^{n}\right )^{2}}{n} + a^{2} d \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*log(c*x^n))^2/x,x, algorithm="maxima")

[Out]

b^2*e*x*log(c*x^n)^2 - 2*a*b*e*n*x + 2*a*b*e*x*log(c*x^n) + 1/3*b^2*d*log(c*x^n)^3/n + 2*(n^2*x - n*x*log(c*x^
n))*b^2*e + a^2*e*x + a*b*d*log(c*x^n)^2/n + a^2*d*log(x)

________________________________________________________________________________________

Fricas [B]  time = 1.03522, size = 347, normalized size = 4.96 \begin{align*} \frac{1}{3} \, b^{2} d n^{2} \log \left (x\right )^{3} + b^{2} e x \log \left (c\right )^{2} - 2 \,{\left (b^{2} e n - a b e\right )} x \log \left (c\right ) +{\left (b^{2} e n^{2} x + b^{2} d n \log \left (c\right ) + a b d n\right )} \log \left (x\right )^{2} +{\left (2 \, b^{2} e n^{2} - 2 \, a b e n + a^{2} e\right )} x +{\left (b^{2} d \log \left (c\right )^{2} + a^{2} d - 2 \,{\left (b^{2} e n^{2} - a b e n\right )} x + 2 \,{\left (b^{2} e n x + a b d\right )} \log \left (c\right )\right )} \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*log(c*x^n))^2/x,x, algorithm="fricas")

[Out]

1/3*b^2*d*n^2*log(x)^3 + b^2*e*x*log(c)^2 - 2*(b^2*e*n - a*b*e)*x*log(c) + (b^2*e*n^2*x + b^2*d*n*log(c) + a*b
*d*n)*log(x)^2 + (2*b^2*e*n^2 - 2*a*b*e*n + a^2*e)*x + (b^2*d*log(c)^2 + a^2*d - 2*(b^2*e*n^2 - a*b*e*n)*x + 2
*(b^2*e*n*x + a*b*d)*log(c))*log(x)

________________________________________________________________________________________

Sympy [B]  time = 1.74437, size = 204, normalized size = 2.91 \begin{align*} a^{2} d \log{\left (x \right )} + a^{2} e x + a b d n \log{\left (x \right )}^{2} + 2 a b d \log{\left (c \right )} \log{\left (x \right )} + 2 a b e n x \log{\left (x \right )} - 2 a b e n x + 2 a b e x \log{\left (c \right )} + \frac{b^{2} d n^{2} \log{\left (x \right )}^{3}}{3} + b^{2} d n \log{\left (c \right )} \log{\left (x \right )}^{2} + b^{2} d \log{\left (c \right )}^{2} \log{\left (x \right )} + b^{2} e n^{2} x \log{\left (x \right )}^{2} - 2 b^{2} e n^{2} x \log{\left (x \right )} + 2 b^{2} e n^{2} x + 2 b^{2} e n x \log{\left (c \right )} \log{\left (x \right )} - 2 b^{2} e n x \log{\left (c \right )} + b^{2} e x \log{\left (c \right )}^{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*ln(c*x**n))**2/x,x)

[Out]

a**2*d*log(x) + a**2*e*x + a*b*d*n*log(x)**2 + 2*a*b*d*log(c)*log(x) + 2*a*b*e*n*x*log(x) - 2*a*b*e*n*x + 2*a*
b*e*x*log(c) + b**2*d*n**2*log(x)**3/3 + b**2*d*n*log(c)*log(x)**2 + b**2*d*log(c)**2*log(x) + b**2*e*n**2*x*l
og(x)**2 - 2*b**2*e*n**2*x*log(x) + 2*b**2*e*n**2*x + 2*b**2*e*n*x*log(c)*log(x) - 2*b**2*e*n*x*log(c) + b**2*
e*x*log(c)**2

________________________________________________________________________________________

Giac [B]  time = 1.21575, size = 228, normalized size = 3.26 \begin{align*} b^{2} n^{2} x e \log \left (x\right )^{2} + \frac{1}{3} \, b^{2} d n^{2} \log \left (x\right )^{3} - 2 \, b^{2} n^{2} x e \log \left (x\right ) + 2 \, b^{2} n x e \log \left (c\right ) \log \left (x\right ) + b^{2} d n \log \left (c\right ) \log \left (x\right )^{2} + 2 \, b^{2} n^{2} x e - 2 \, b^{2} n x e \log \left (c\right ) + b^{2} x e \log \left (c\right )^{2} + 2 \, a b n x e \log \left (x\right ) + b^{2} d \log \left (c\right )^{2} \log \left (x\right ) + a b d n \log \left (x\right )^{2} - 2 \, a b n x e + 2 \, a b x e \log \left (c\right ) + 2 \, a b d \log \left (c\right ) \log \left (x\right ) + a^{2} x e + a^{2} d \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*log(c*x^n))^2/x,x, algorithm="giac")

[Out]

b^2*n^2*x*e*log(x)^2 + 1/3*b^2*d*n^2*log(x)^3 - 2*b^2*n^2*x*e*log(x) + 2*b^2*n*x*e*log(c)*log(x) + b^2*d*n*log
(c)*log(x)^2 + 2*b^2*n^2*x*e - 2*b^2*n*x*e*log(c) + b^2*x*e*log(c)^2 + 2*a*b*n*x*e*log(x) + b^2*d*log(c)^2*log
(x) + a*b*d*n*log(x)^2 - 2*a*b*n*x*e + 2*a*b*x*e*log(c) + 2*a*b*d*log(c)*log(x) + a^2*x*e + a^2*d*log(x)